// 模块化的使用

const state = {
    msg: 'l love you'
}
const mutations = {
    SET_CHILD2_MSG(state, text) {
        state.msg = text
    }
}
const actions = {
    changeChild2Message({ commit }, text) {
        commit('SET_CHILD2_MSG', text)
    }
}
const getters = {
    child2Msg(state) {
        return state.msg + 'qwer'
    }
}

export default {
    state,
    mutations,
    actions,
    getters,
}